package com.ruoyi.PersonalElectricityUsage.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.PersonalElectricityUsage.mapper.PersonalElectricityUsageMapper;
import com.ruoyi.PersonalElectricityUsage.domain.PersonalElectricityUsage;
import com.ruoyi.PersonalElectricityUsage.service.IPersonalElectricityUsageService;

/**
 * 个人用电信息Service业务层处理
 * 
 * @author 智电未来
 * @date 2024-07-12
 */
@Service
public class PersonalElectricityUsageServiceImpl implements IPersonalElectricityUsageService 
{
    @Autowired
    private PersonalElectricityUsageMapper personalElectricityUsageMapper;

    /**
     * 查询个人用电信息
     * 
     * @param id 个人用电信息主键
     * @return 个人用电信息
     */
    @Override
    public PersonalElectricityUsage selectPersonalElectricityUsageById(Long id)
    {
        return personalElectricityUsageMapper.selectPersonalElectricityUsageById(id);
    }

    /**
     * 查询个人用电信息列表
     * 
     * @param personalElectricityUsage 个人用电信息
     * @return 个人用电信息
     */
    @Override
    public List<PersonalElectricityUsage> selectPersonalElectricityUsageList(PersonalElectricityUsage personalElectricityUsage)
    {
        return personalElectricityUsageMapper.selectPersonalElectricityUsageList(personalElectricityUsage);
    }

    /**
     * 新增个人用电信息
     * 
     * @param personalElectricityUsage 个人用电信息
     * @return 结果
     */
    @Override
    public int insertPersonalElectricityUsage(PersonalElectricityUsage personalElectricityUsage)
    {
        return personalElectricityUsageMapper.insertPersonalElectricityUsage(personalElectricityUsage);
    }

    /**
     * 修改个人用电信息
     * 
     * @param personalElectricityUsage 个人用电信息
     * @return 结果
     */
    @Override
    public int updatePersonalElectricityUsage(PersonalElectricityUsage personalElectricityUsage)
    {
        return personalElectricityUsageMapper.updatePersonalElectricityUsage(personalElectricityUsage);
    }

    /**
     * 批量删除个人用电信息
     * 
     * @param ids 需要删除的个人用电信息主键
     * @return 结果
     */
    @Override
    public int deletePersonalElectricityUsageByIds(Long[] ids)
    {
        return personalElectricityUsageMapper.deletePersonalElectricityUsageByIds(ids);
    }

    /**
     * 删除个人用电信息信息
     * 
     * @param id 个人用电信息主键
     * @return 结果
     */
    @Override
    public int deletePersonalElectricityUsageById(Long id)
    {
        return personalElectricityUsageMapper.deletePersonalElectricityUsageById(id);
    }
}
